﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>检验检测智能管理平台</title>

    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="assets/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />

    <!-- page specific plugin styles -->
    <!-- text fonts -->
    <link rel="stylesheet" href="assets/css/fonts.googleapis.com.css" />

    <!-- ace styles -->
    <link rel="stylesheet" href="assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
    <![endif]-->
    <link rel="stylesheet" href="assets/css/ace-skins.min.css" />
    <link rel="stylesheet" href="assets/css/ace-rtl.min.css" />

    <!--[if lte IE 9]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
    <![endif]-->
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="assets/js/ace-extra.min.js"></script>

    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
    <!--[if lte IE 8]>
    <script src="assets/js/html5shiv.min.js"></script>
    <script src="assets/js/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="assets/css/mycss.css">
</head>

<body class="no-skin">
    <div id="navbar" class="navbar navbar-default ace-save-state">
        <!-- /.navbar-container -->
    </div>

    <div class="main-container ace-save-state" id="main-container">
        <script type="text/javascript">
            try {
                ace.settings.loadState('main-container');
            } catch (e) {
            }
        </script>

        <div id="sidebar" class="sidebar responsive ace-save-state">
            <!--左侧导航栏-->
            <ul class="nav nav-list" id="navList"></ul>
        </div>
        <!--右侧内容区-->
        <div class="main-content">
            <div class="main-content-inner">
                <div class="breadcrumbs ace-save-state" id="breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <i class="ace-icon fa fa-home home-icon blue"></i>
                            <a href="index.html">主页</a>
                        </li>
                    </ul>
                </div>
                <!--页面开始-->
                <div class="page-content max-width table-center">
                    <div class="row">
                        <div class="col-xs-12">
                            <!-- PAGE CONTENT BEGINS -->
                            <div class="page-header">
                                <h1 align="center" style="margin-left: 50px">
                                    <strong>新建委托单</strong>
                                </h1>
                            </div>
                            <!--主内容区,分两侧，左侧导航区-2，右侧详情区-10-->
                            <div class="col-md-2">
                                <div class="widget-box widget-color-blue2">
                                    <div class="widget-header">
                                        <h5 class="widget-title lighter smaller">
                                            选择相应模版
                                        </h5>
                                    </div>
                                    <div class="widget-body">
                                        <div class="widget-main padding-8">
                                            <ul id="tree-weituo"></ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-10">
                                <!--空内容div，没有选择具体模版时显示-->
                                <div class="center" id="contain-none" style="display: inline">
                                    <h4 style="margin-top: 100px">请先选择委托单模版</h4>
                                </div>
                                <!--模版1的div-->
                                <div id="contain-1" style="display: none">
                                    <!--*****************基本信息**********************-->
                                    <div class="col-md-12">
                                        <h4><strong>基本信息：</strong></h4>
                                    </div>
                                    <div class="col-md-12 " style="margin-top: 20px">
                                        <div class="col-md-6 center">
                                            <label class=""
                                                   for="task_company">委托单位：</label>
                                            <input id="task_company" type="text"
                                                   class="span3 edit-large"
                                                   style="border-radius: 5px">
                                        </div>
                                        <div class="col-md-6">
                                            <label class=""
                                                   for="task_description">委托说明：</label>
                                            <input id="task_description" type="text"
                                                   class="span3 edit-large"
                                                   placeholder="务必填写，方便以后查找委托单"
                                                   style="border-radius: 5px">
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <label class=""
                                                   for="task_pname">项目名称：</label>
                                            <input id="task_pname" type="text"
                                                   class="span3 edit-large"
                                                   readonly="readonly"
                                                   placeholder="直接获取"
                                                   style="border-radius: 5px">
                                        </div>
                                        <div class="col-md-6">
                                            <div class=" control-label ">
                                                <label class="" for="task_product">产品名称：</label>
                                                <input id="task_product" type="text"
                                                       class="span3 edit-large"
                                                       placeholder="选填"
                                                       style="border-radius: 5px">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <label class=""
                                                   for="task_opportunity">检测时机：</label>
                                            <select id="task_opportunity"
                                                    class="custom-select d-block mselect-width-60"
                                                    required="" style="border-radius: 5px">
                                                <option value="焊接冷却后">焊接冷却后</option>
                                                <option value="焊后24h">焊后24h</option>
                                                <option value="热处理后">热处理后</option>
                                            </select>
                                        </div>
                                        <div class="col-md-6">
                                            <div class=" control-label ">
                                                <label class=""
                                                       for="task_pdid">产品编号：</label>
                                                <input id="task_pdid" type="text"
                                                       class="span3 edit-large"
                                                       placeholder="请输入文字..."
                                                       style="border-radius: 5px">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <label class=""
                                                   for="task_standard">检测标准：</label>
                                            <select id="task_standard"
                                                    class="custom-select d-block mselect-width-60"
                                                    required="" style="border-radius: 5px"></select>
                                        </div>
                                        <div class="col-md-6">
                                            <div class=" control-label ">
                                                <label class=""
                                                       for="task_position">检测部位：</label>
                                                <select id="task_position"
                                                        class="custom-select d-block mselect-width-60"
                                                        required="" style="border-radius: 5px"></select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <label class=""
                                                   for="task_heat">热处理状态:</label>
                                            <select id="task_heat"
                                                    class="custom-select d-block mselect-width-60"
                                                    required="" style="border-radius: 5px"></select>
                                        </div>
                                        <div class="col-md-6">
                                            <div class=" control-label ">
                                                <label class=""
                                                       for="task_addr">检测地点：</label>
                                                <input id="task_addr" type="text"
                                                       class="span3 edit-large"
                                                       placeholder="请输入文字..."
                                                       style="border-radius: 5px">
                                            </div>
                                        </div>

                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <div class=" control-label ">
                                                <label class=""
                                                       for="task_level">技术等级：</label>
                                                <input id="task_level" type="text"
                                                       class="span3 edit-large"
                                                       placeholder="请输入文字..."
                                                       style="border-radius: 5px">
                                            </div>
                                        </div>
                                        <div class="col-md-6 ">
                                            <div class=" control-label ">
                                                <label class="" for="task_time">检测时间：</label>
                                                <input id="task_time" type="date" class="span3 edit-large" style="border-radius: 5px">
                                            </div>
                                        </div>

                                    </div>
                                    <div class="col-md-12" style="margin-top: 10px">
                                        <div class="col-md-6 center">
                                            <div class=" control-label ">
                                                <label class=""
                                                       for="task_check">验收标准：</label>
                                                <input id="task_check" type="text"
                                                       class="span3 edit-large"
                                                       placeholder="请输入文字..."
                                                       style="border-radius: 5px">
                                            </div>
                                        </div>
                                        <div class="col-md-6 ">
                                            <div class=" control-label ">
                                                <label class="" for="task_type">委托类型：</label>
                                                <select id="task_type"
                                                        class="custom-select d-block mselect-width-60"
                                                        required="" style="border-radius: 5px"></select>
                                            </div>
                                        </div>
                                    </div>
                                    <!--*****************工件信息**********************-->
                                    <div class="col-md-12"
                                         style="margin-top: 20px">
                                        <h4><strong>工件信息：</strong></h4>
                                    </div>
                                    <div class="col-md-12" style="overflow: auto">
                                        <table id="table0"
                                               class="table table-striped table-sm width-100 table-center"
                                               style="margin-top: 20px; white-space: nowrap;">
                                            <thead>
                                                <tr>
                                                    <th>部件/管线编号</th>
                                                    <th>工件/焊缝编号</th>
                                                    <th>部件/管线名称</th>
                                                    <th>检测比例</th>
                                                    <th>返修次数</th>
                                                    <th>返修备注</th>
                                                    <th>规格</th>
                                                    <th>材质</th>
                                                    <th>坡口形式</th>
                                                    <th>焊接方法</th>
                                                    <th>焊工号</th>
                                                    <th>焊接时间</th>
                                                    <th>检测方法</th>
                                                    <th>合格级别</th>
                                                    <th>操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td />
                                                    <td>
                                                        <button class="btn btn-xs btn-success" onclick="OnClickPlus(0)">
                                                            <i class="ace-icon fa fa-plus bigger-120"></i>
                                                        </button>
                                                    </td>
                                                </tr>

                                            </tbody>
                                        </table>
                                    </div>

                                    <!--*****************底部添加工件/提交按钮************-->
                                    <div class="col-md-12">
                                        <div class="table-responsive  width-90 table-center" style="margin-top: 20px; text-align:center">
                                            <button class="btn btn-xs btn-success" id="commitDeputeBtn">
                                                <i class="ace-icon fa fa-check bigger-120"> 提交委托</i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
        <div class="footer-inner">
            <div class="footer-content">
                <span class="bigger-120">
                    <span class="blue bolder">@浙江工业大学计算机学院</span>
                    Application &copy; 2013-2014
                </span>
                &nbsp; &nbsp;
            </div>
        </div>
    </div>
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>
    <!-- /.main-container -->
    <!-- basic scripts -->
    <!--[if !IE]> -->
    <script src="assets/js/jquery-2.1.4.min.js"></script>
    <!-- <![endif]-->
    <script>

        setTimeout(function () {
            $('#list_qita').addClass('active open')
            $('#xinjianweituodan').addClass('active')
        }, 50)
    </script>
    <!--[if IE]>
    <script src="assets/js/jquery-1.11.3.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
        if ('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
    </script>
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- page specific plugin scripts -->
    <!-- ace scripts -->
    <script src="assets/js/ace-elements.min.js"></script>
    <script src="assets/js/ace.min.js"></script>
    <script src="assets/js/tree.min.js"></script>
    <!-- inline scripts related to this page -->
    <!--左侧树状结构导航栏的js-->
    <script type="text/javascript">
        jQuery(function ($) {
            var sampleData = initiateDemoData();
            $('#tree-weituo').ace_tree({
                dataSource: sampleData['dataSource2'],
                loadingHTML: '<div class="tree-loading"><i class="ace-icon fa fa-refresh fa-spin blue"></i></div>',
                'open-icon': 'ace-icon fa fa-folder-open',
                'close-icon': 'ace-icon fa fa-folder',
                'itemSelect': true,
                'folderSelect': false,
                'multiSelect': false,
                'selected-icon': null,
                'unselected-icon': null,
                'folder-open-icon': 'ace-icon tree-plus',
                'folder-close-icon': 'ace-icon tree-minus'
            }).on('selected.fu.tree', function (e, data) {
                console.log("哇哦" + JSON.stringify(data));
                var div_none = document.getElementById('contain-none');
                var div_contain_1 = document.getElementById('contain-1');
                div_none.style.display = 'none';
                div_contain_1.style.display = 'inline';
            });

            /**
             //Use something like this to reload data
             $('#tree1').find("li:not([data-template])").remove();
             $('#tree1').tree('render');
             */

            /**
             //please refer to docs for more info
             $('#tree1')
             .on('loaded.fu.tree', function(e) {
            })
             .on('updated.fu.tree', function(e, result) {
            })
             .on('selected.fu.tree', function(e) {
            })
             .on('deselected.fu.tree', function(e) {
            })
             .on('opened.fu.tree', function(e) {
            })
             .on('closed.fu.tree', function(e) {
            });
             */

            function initiateDemoData() {
                var treeDatas = {
                    'guandao': { text: '管道', type: 'folder', 'icon-class': 'red' },
                    'guoru': { text: '锅炉', type: 'folder', 'icon-class': 'red' },
                    'yalichi': { text: '压力容器地', type: 'folder', 'icon-class': 'red' },
                    // 'qita-2': {text: '<i class="ace-icon fa fa-file-text pink"></i> XXX型', type: 'item'},
                }
                treeDatas['guandao']['additionalParameters'] = {
                    'children': {
                        'shexianjiance': { text: '射线检测类型', type: 'folder', 'icon-class': 'pink' },
                        // 'yshexianjiance': {text: 'Y射线检测', type: 'folder', 'icon-class': 'pink'}
                    }
                }
                treeDatas['guandao']['additionalParameters']['children']['shexianjiance']['additionalParameters'] = {
                    'children': {
                        'xshexianjiance': { text: 'X射线检测', type: 'folder', 'icon-class': 'pink' },
                        'yshexianjiance': { text: 'Y射线检测', type: 'folder', 'icon-class': 'pink' },
                    }
                }
                treeDatas['guandao']['additionalParameters']['children']['shexianjiance']['additionalParameters']['children']['xshexianjiance']['additionalParameters'] = {
                    'children': [
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-1', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-2', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-3', type: 'item' },
                    ]
                }
                treeDatas['guandao']['additionalParameters']['children']['shexianjiance']['additionalParameters']['children']['yshexianjiance']['additionalParameters'] = {
                    'children': [
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> y射线-1', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> y射线-2', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> y射线-3', type: 'item' },
                    ]
                }
                treeDatas['guoru']['additionalParameters'] = {
                    'children': {
                        'shexianjiance': { text: '射线检测类型', type: 'folder', 'icon-class': 'pink' },
                    }
                }
                treeDatas['guoru']['additionalParameters']['children']['shexianjiance']['additionalParameters'] = {
                    'children': {
                        'xshexianjiance': { text: 'X射线检测', type: 'folder', 'icon-class': 'pink' },
                    }
                }
                treeDatas['guoru']['additionalParameters']['children']['shexianjiance']['additionalParameters']['children']['xshexianjiance']['additionalParameters'] = {
                    'children': [
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-1', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-2', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-3', type: 'item' },
                    ]
                }

                treeDatas['yalichi']['additionalParameters'] = {
                    'children': {
                        'shexianjiance': { text: '射线检测类型', type: 'folder', 'icon-class': 'pink' },
                    }
                }
                treeDatas['yalichi']['additionalParameters']['children']['shexianjiance']['additionalParameters'] = {
                    'children': {
                        'xshexianjiance': { text: 'X射线检测', type: 'folder', 'icon-class': 'pink' },
                    }
                }
                treeDatas['yalichi']['additionalParameters']['children']['shexianjiance']['additionalParameters']['children']['xshexianjiance']['additionalParameters'] = {
                    'children': [
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-1', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-2', type: 'item' },
                        { text: '<i class="ace-icon fa fa-file-text blue"></i> X射线-3', type: 'item' },
                    ]
                }
                var dataSource = function (options, callback) {
                    var $data = null
                    if (!("text" in options) && !("type" in options)) {
                        $data = treeDatas;//the root tree
                        callback({ data: $data });
                        return;
                    }
                    else if ("type" in options && options.type == "folder") {
                        if ("additionalParameters" in options && "children" in options.additionalParameters)
                            $data = options.additionalParameters.children || {};
                        else $data = {}//no data
                    }

                    if ($data != null)//this setTimeout is only for mimicking some random delay
                        setTimeout(function () {
                            callback({ data: $data });
                        }, 300);

                    //we have used static data here
                    //but you can retrieve your data dynamically from a server using ajax call
                    //checkout examples/treeview.html and examples/treeview.js for more info
                }
                return { 'dataSource2': dataSource }
            }
        });
    </script>

    <script src="ownjs/head.js"></script>
    <script src="ownjs/index.js"></script>
    <script src="ownjs/newDepute.js"></script>

</body>
</html>
